<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jstl/fmt_rt"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%>
<%@ taglib prefix="idy" uri="http://www.ideyatech.com/tides"%>

<td colspan="3">
	<div class="new-form-content">
		<form:form id="allergen-form-${allergen.id}" commandName="allergen"
			cssClass="form-horizontal">
			<div class="form-box-title">
				<h4>
					<idy:form_title isNew="${allergen.isNew}" formName="allergen" />
				</h4>
			</div>
			<spring:bind path="allergen.*">
				<c:if test="${status.error}">
					<!-- this is a hack to crud.js to handle validation messages. -->
					<c:if test="${allergen.isNew}">
						<!-- <tr id="allergen-row-new"> -->
					</c:if>
					<div class='alert alert-error admin-error'>
						<button type="button" class="close" data-dismiss="alert">&times;</button>
						<strong>Oh snap!</strong><br />
						<form:errors path="*" />
					</div>
				</c:if>
			</spring:bind>
			<div class="control-group">
				<form:label path="name" cssClass="control-label">
					<spring:message code="label.admin.allergen.name" /> :</form:label>
				<div class="controls">
					<form:input path="name" size="40" maxlength="100" autocomplete="off"/>
					<sup class="required">*</sup>
				</div>
			</div>
			<div class="control-group">
				<form:label path="description" cssClass="control-label">
					<spring:message code="label.admin.allergen.description" /> :</form:label>
				<div class="controls">
					<form:textarea path="description" cssClass="wide" />
				</div>
			</div>
			<div class="control-group">
				<div class="controls">
					<idy:submit_button id="${allergen.id}" page="allergens.jspx"
						formName="allergen-form-${allergen.id}" prefix="allergen" />
					<idy:cancel_button id="${allergen.id}" page="allergens.jspx"
						prefix="allergen" />
				</div>
			</div>
		</form:form>
	</div>
</td>